package com.pro.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * ClassName:JsLoginRecord
 * Package:com.pro.pojo
 * Description: 登录日志
 *
 * @Date:2021/11/4 上午 9:16
 * @Author:太宰
 */
@Data
@EqualsAndHashCode
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class JsLoginRecord {
    private Integer id;//主键id
    private Integer userId;//用户id
    private String loginIp;//登录ip
    private String loginAddress;//登陆地区
    private Integer loginState;//登录状态，2登录成功，3登陆失败

    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date loginDate;//登陆时间

    private Integer loginType;//类型，2后台，3前台

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public void setLoginState(Integer loginState) {
        this.loginState = loginState;
    }

    public void setLoginType(Integer loginType) {
        this.loginType = loginType;
    }

    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }
}
